package _2ChapterTwo._7IntroduceForeignMethod;

import java.util.Date;

public class Main {
    public static void main(String[] args) {
        Date date = new Date();

        Date nextDay1 = new Date(date.getTime() + 86400000);

        Date nextDay2 = nextDay(date);
        System.out.println(date);
        System.out.println(nextDay1);
        System.out.println(nextDay2);
    }

    public static Date nextDay(Date date) {
        return new Date(date.getTime() + 86400000);
    }
}
